<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>关于我们</title>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <style>
        .aui-bar-nav {
            /*padding: 0 11px 0 13px;
        box-sizing: border-box;*/
            top: 0;
            line-height: 2.25rem;
            background-color: #fff;
            color: #ffffff;
            border: none;
            background-size: 100% 1px;
            background-repeat: no-repeat;
            background-position: bottom;
            background-image: linear-gradient(0, #EEEEEE, #EEEEEE 50%, transparent 50%);
            background-image: -webkit-linear-gradient(90deg, #EEEEEE, #EEEEEE 50%, transparent 50%);
        }

        .aui-bar-nav .aui-btn .aui-iconfont {
            font-size: 0.9rem;
            line-height: 1.25rem;
            padding: 0;
            margin: 0;
            color: #000000;
        }

        .aui-bar-nav .aui-title {
            min-height: 2.25rem;
            position: absolute;
            margin: 0;
            text-align: center;
            white-space: nowrap;
            right: 5rem;
            left: 5rem;
            width: auto;
            overflow: hidden;
            text-overflow: ellipsis;
            z-index: 2;
            color: #333333;
            font-size: 17px;
        }

        .aui-btn span {
            width: 22px;
            height: 22px;
        }

        .aui-btn span img {
            width: 22px;
            height: 22px;
        }

        .aui-bar-nav .aui-pull-right {
            padding: 0 11px;
            font-size: 0.8rem;
            font-weight: 400;
            z-index: 2;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            display: -webkit-box;
            display: -webkit-flex;
            display: flex;
            -webkit-align-items: center;
            align-items: center;
        }

        button,
        .aui-btn {
            position: relative;
            display: inline-block;
            font-size: 0.7rem;
            font-weight: 400;
            font-family: inherit;
            text-decoration: none;
            text-align: center;
            margin: 0;
            background: #EEEEEE;
            padding: 0 15px!important;
            height: 1.5rem;
            line-height: 1.5rem;
            border-radius: 0.2rem;
            white-space: nowrap;
            text-overflow: ellipsis;
            vertical-align: middle;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            -webkit-user-select: none;
            user-select: none;
        }

        .aui-pull-right {
            font-size: 15px;
            color: #222222!important;
            text-align: right;
        }
    </style>
</head>

<body>
    <header class="aui-bar aui-bar-nav" id="header">
        <a class="aui-pull-left aui-btn" tapmode onclick="closeWin()">
            <span>
               <img src="../../image/back_arrow.png" alt="">
            </span>
        </a>
        <div class="aui-title">我的足迹</div>
        <a class="aui-pull-right aui-btn aui-btn-outlined" tapmode onclick="clearBrowse()">
            <span class="aui-iconfont aui-icon-trash"></span>
        </a>
    </header>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/vue.js"></script>
<script type="text/javascript" src="../../script/cling.js"></script>
<script type="text/javascript">
    apiready = function() {
        cl.apiready();
        cl.openFrame({
            name: './browse_footprint_frame',
            header: header,
            bounces: false,
            bgColor: "#FAF9F9"
        });
    }

    function closeWin() {
        cl.closeWin({
            name: 'browse_footprint'
        })
    }

    function clearBrowse(){
      console.log(cl.userToken);
      console.log(cl.mid);
      cl.openAlert({
          title:'温馨提示',
          content: '确定清空浏览足迹?',
          rightBtnTitle: '立即清空'
      }, function(res) {
          if (res.eventType === "right") {
            api.ajax({
                url: cl.apiServer + 'browsingHistory/cancelBrowsing',
                method: 'post',
                headers: {
                    'Content-Type': 'application/json;charset=utf-8',
                    token:cl.userToken
                },
                data: {
                    body: {
                        mid: cl.mid,
                        version:cl.deviceInfo().appVersion,
                        mobileInfo:cl.systemType()
                    }
                }
            }, function(ret, err) {
                if (ret) {
                    console.log(JSON.stringify(ret));
                    if (ret.code == 0) {
                        cl.closeLoading();
                        var jsfun1 = 'vm.init()';
                        setTimeout(function(){
                          api.execScript({
                              frameName: 'browse_footprint_frame',
                              script: jsfun1
                          });
                        },1000)


                    }else if (ret.code == 401) {
                      cl.openWin({
                          name: '../login/code_login'
                      })

                    }
                }
            });
          }
      });
    }
</script>

</html>
